package com.shijunhao.graduation.exception;

import org.springframework.http.HttpStatus;

/**
 * @author: shijunhao
 * @date: 2022/3/2 22:24
 * @description:
 */
public class BaseException extends RuntimeException{
    private Integer code;
    private String msg = null;

    public BaseException() {
        super();
        this.code = HttpStatus.INTERNAL_SERVER_ERROR.value();
    }

    public BaseException(Integer code,String message) {
        super(message);
        this.code = code;
        this.msg = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
